package edu.gzy.rpsm_property.pojo;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
public class User {
    @ApiModelProperty("用户id")
    private Integer userid;
    @ApiModelProperty("用户性别")
    private Short gender;
    @ApiModelProperty("用户年龄")
    private Short age;
    @ApiModelProperty("用户状态")
    private Short user_status;
    @ApiModelProperty("用户所属房屋id")
    private Short user_roomid;
    @ApiModelProperty("身份证号")
    private String idcard;
    @ApiModelProperty("用户头像保存路径")
    private String user_avatar;
    @ApiModelProperty("用户账号")
    private String account;
    @ApiModelProperty("用户token")
    private String token;
    @ApiModelProperty("用户姓名")
    private String username;
    @ApiModelProperty("用户类型")
    private Short user_type;
    @ApiModelProperty("用户密码")
    private String password;
    @ApiModelProperty("用户房间信息，可能一个人有多间房")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private List<Room> rooms;

    @Override
    public String toString() {
        return "User{" +
                "userid=" + userid +
                ", gender=" + gender +
                ", age=" + age +
                ", user_status=" + user_status +
                ", user_roomid=" + user_roomid +
                ", idcard='" + idcard + '\'' +
                ", user_avatar='" + user_avatar + '\'' +
                ", account='" + account + '\'' +
                ", token='" + token + '\'' +
                ", username='" + username + '\'' +
                ", user_type=" + user_type +
                ", password='" + password + '\'' +
                ", rooms=" + rooms +
                '}';
    }
}
